<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
<form action="demo2" method="post">
    <button>POST请求 </button>
</form>
<button onclick="post()">POST请求</button>
<hr>
<form action="demo8" method="post" enctype="application/x-www-form-urlencoded">
    <button>POST请求（请求体 application/x-www-form-urlencoded)</button>
</form>

<form action="demo8" method="post" enctype="multipart/form-data">
    <button>POST请求（请求体 multipart/form-data）</button>
</form>

<script>
    function  post(){
        axios.post("demo2").then(res=>{
            alert(res.data);
    })
    }
</script>
</body>
</html>